package org.coder.consumer_rest_9001.controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/consumer")
public class consumer {
    @Resource
    private RestTemplate restTemplate;

    String URL = "http://localhost:8001/wegGis/hello";

    @GetMapping("/test")
    public String test(){
        return restTemplate.getForObject(URL,String.class);
    }
}
